n = int(input())
sum = 1.0
fact = 1
for i in range(1,n+1):
    fact *= i
    sum += 1/fact
print(f"{sum:.8f}")